<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title>无标题文档</title>
</head>

<body>
<script type="text/javascript">
try{
	document.forms.input.length;					//调用页面表单中文本框的长度
}catch(exception){
	alert("try区域运行时有异常发生");					//弹出错误提示信息
	try{
		document.forms.input.length
	}catch(exception2){
		alert("catch区域运行时有异常发生");
	}
}finally{
	alert("结束try...catch...finally语句");		//最终程序调用执行的语句
}
</script>

</body>
</html>
